Skip to content

[9.x] Prepare 9.0.0 for release - #278

Open
nfourtythree wants to merge 1 commit into
9.xfrom
feature/shopify-9x-release-prep
Open

nfourtythree wants to merge 1 commit into
9.xfrom
feature/shopify-9x-release-prep

Conversation

@nfourtythree

Copy link
Copy Markdown
Contributor

This PR prepares 9.x for 9.0.0. I upgraded a Shopify 8 / Craft 5 project to Craft 6 and 9.x without craftcms/yii2-adapter, on MySQL 8.0 and Postgres 16, following UPGRADE.md as written. This PR fixes the bugs and doc gaps that turned up.

Changes

  • craftcms/cms goes from 6.x-dev to ^6.0.0-beta.3. Craft 6 has no stable tag yet. Beta.3 is the first tag that contains the commit the lock was on.
  • A new migration (schema 9.0.0.6) renames core field layout elements in shopify.productFieldLayout in project config. Craft's migrate_field_layout_element_types only renames them under fieldLayout and fieldLayouts keys.1
  • The product index sorts by Product, Shopify ID and Shopify Status again. The sort options had no attribute, so core never matched the column names the index sends. 8.x had the same bug.
  • connectLiveShopify() calls Http::allowStrayRequests(). All three live tests failed on 9.x after [9.x] Remove the Yii 2 adapter #277 moved the API client to Http, because tests/Pest.php blocks stray requests. The faked tests still block them.
  • UPGRADE.md:
    • Switch config/shopify.php to env() before composer update. With craft\helpers\App::env(), every Artisan command fails, including package:discover.
    • A new step runs craft:resave:shopify-products --update-search-index. 8.x stored empty options keywords, so option values weren't searchable after the upgrade.
    • Old index.php?p= webhook URLs return an error response (419 on beta.3), not a 403. The example URL now includes /admin/.
  • README: the Upgrading section points to UPGRADE.md, and the Element API and JS examples use Craft 6 names. The craftcms.com/docs/5.x links stay because the 6.x docs don't have those pages yet.

At release

  • Replace CHANGELOG.md's ## Unreleased section with ## 9.0.0 and the content of CHANGELOG-WIP.md, then delete CHANGELOG-WIP.md. The 13 entries under ## Unreleased are all in CHANGELOG-WIP.md too.
  • The translation-sync config on the translations branch needs a 9.x: lang entry.
  • SEOmatic's SeoShopifyProduct still uses craft\shopify\… and Products::EVENT_BEFORE_SYNCHRONIZE_PRODUCT. It needs ProductSyncing and CraftCms\Shopify\….

Evidence

Upgrade, on both databases:

  • craft:up ran each of the six 9.x migrations once. A second run found nothing, and craft:project-config:diff was empty.
  • Element types, field layouts, the Products field's condition, element sources and settings carried over.
  • A full sync (533 products), every webhook topic, the CP screens, the front end and GraphQL worked. Output matched the Craft 5 captures, apart from the documented templateSuffix change.

Checks:

Check Result
Pest, SQLite 161 passed, 4 skipped
Pest, MySQL 8.0 162 passed, 3 skipped
Pest, MariaDB 11.4 162 passed, 3 skipped
Pest, Postgres 16 161 passed, 4 skipped
Pest live group, dev store credentials 3 passed
Pint, Larastan, Prettier Pass

The new MigrationsTest case and the four ProductIndexTest cases fail without their fixes.

Footnotes

  1. Without the adapter, applying project config writes craft\fieldlayoutelements\CustomField back to fieldlayouts. Craft 6 can't load that class, so the custom field drops out of the layout and reading it throws Invalid field handle. Core's map also lacks Template, so the migration adds it. Both are worth reporting to craftcms/cms. ↩

Repeat the upgrade from Shopify 8 without the Yii 2 adapter, on MySQL
8.0 and Postgres 16, and fix what it found.

- Require craftcms/cms ^6.0.0-beta.3 instead of 6.x-dev.
- Migrate core field layout elements in the product field layout's
  project config. Craft's own migration skips shopify.productFieldLayout,
  so applying project config dropped custom fields from the layout.
- Fix sorting the product index by title, Shopify ID and Shopify status.
- Let the opt-in live API tests make real requests again.
- UPGRADE.md: update config/shopify.php before composer update, resave
  products to index option values, and correct the webhook URL notes.
- README: remove Craft 5 and adapter leftovers.
@nfourtythree
nfourtythree requested a review from a team as a code owner December 2, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant